/**
 * 熊猫直播间初始化
 * @param page
 * @param sleep
 * @returns {Promise<void>}
 */
module.exports = async ({page, sleep}) => {
    await page.addStyleTag({
        content: `
        .js-anchor-task,
        .js-sofa-container,
        .js-share-panel,
        .cj-modal,
        .js-size-flash-video > :nth-child(n+2),
        .act-view-container
            {display: none !important;}            
        `
    });
    await sleep(5000);
    await page.evaluate(() => {
        const $player = document.querySelector('div.room-container');
        if ($player)
            window.scrollTo(0, $player.getBoundingClientRect().y);
    });
};